package com.usian.admin.usianleadnewsadmin;

import com.usian.utils.common.BCrypt;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.util.DigestUtils;

@SpringBootTest
public class Md5TestClass {
    @org.junit.Test
    public  void ma() {
        String bytes = DigestUtils.md5DigestAsHex(("admin"+"123abc").getBytes());
        System.out.println(bytes);
    }

    @org.junit.Test
    public void bcroyttest(){
        String gensalt = BCrypt.gensalt();
        String hashpw = BCrypt.hashpw("123456", gensalt);
        System.out.println(hashpw);
        boolean checkpw = BCrypt.checkpw("123456", hashpw);
        System.out.println(checkpw);
    }
}
